package com.tinem.platform.web.file.vo;

import com.tinem.platform.module.starter.web.annotation.EnumValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;

/**
 * @program: platform
 * @description: ${description}
 * @author: eden#can
 * @Slogan: 没有所谓失败，除非你不再尝试
 * @date: 2021-12-10 18:04
 **/
@Data
@ApiModel("获取视频的帧并保存为图片")
public class FetchFrameVO {

    /**
     * 文件base64流
     */
    @NotBlank(message = "fileBase64 is not blank!")
    @ApiModelProperty(name = "fileBase64", value = "文件base64流",required = true)
    private String fileBase64;
    /**
     * 获取第几帧的图片
     */
    @Min(1)
    @ApiModelProperty(name = "grabFrame", value = "5",required = true,dataType = "Integer",example = "截取视频的第几帧为图片")
    private int grabFrame = 5;

    @EnumValue(values = {"mp4"})
    @NotBlank(message = "videoFormatName is not blank!")
    @ApiModelProperty(name = "videoFormatName", value = "mp4",required = true,dataType = "String",example = "视频文件的格式")
    private String videoFormatName = "mp4";

    @EnumValue(values = {"jpeg","jpg","png"})
    @NotBlank(message = "outFormatName is not blank!")
    @ApiModelProperty(name = "outFormatName", value = "jpeg",required = true,dataType = "String",example = "输出文件的格式")
    private String outFormatName = "jpeg";

}
